<?php

namespace App\Logging\Custom;

use App\Logging\Handler\LoggingByLevelHandler;
use Monolog\Logger;

class LoggingByLevelLogger
{

    public function __invoke(array $config)
    {
        $logger = new Logger('local');

        $logger->pushHandler(new LoggingByLevelHandler(
            $config['path'],
            $config['days'],
            $config['level']
        ));

        return $logger;
    }


}
